package com.sz.business.bmo.impl;

import java.util.List;
import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.sz.business.bmo.IBusinessBMO;
import com.sz.business.dao.IBusinessDAO;

public class BusinessBMO implements IBusinessBMO{
	
	protected final Log logger = LogFactory.getLog(getClass());

	public IBusinessDAO getBusinessDAO() {
		return businessDAO;
	}

	public void setBusinessDAO(IBusinessDAO businessDAO) {
		this.businessDAO = businessDAO;
	}

	protected IBusinessDAO businessDAO = null;
	
	@SuppressWarnings("unchecked")
	/**
	 * �ɽ��ܵ�������
	 * TICKET_ID STATUS CUST_TEL CUST_NAME BUSINESS_ID REGION CREATE_MANAGER LOCK_MANAGER
	 */
	public List queryBusiness(Map map) throws Exception {
		return businessDAO.queryBusiness(map);
	}
	
	@SuppressWarnings("unchecked")
	public long queryBusinessCount(Map map) throws Exception {
		return businessDAO.queryBusinessCount(map);
	}
	
	@SuppressWarnings("unchecked")
	public List queryBusinessPage(Map map) throws Exception {
		return businessDAO.queryBusinessPage(map);
	}

	
	@SuppressWarnings("unchecked")
	public long addBusiness(Map map) throws Exception {
		return businessDAO.addBusiness(map);
	}
	@SuppressWarnings("unchecked")
	public long delBusiness(Map map) throws Exception{
		return businessDAO.delBusiness(map);
	}

	
	@SuppressWarnings("unchecked")
	public long updateBusiness(Map map) throws Exception {
		return businessDAO.updateBusiness(map);
	}
	@SuppressWarnings("unchecked")
	public String lockBusiness(Map map) throws Exception {
		String msg = businessDAO.lockBusiness(map);
		if(msg == null) {
			msg = "操作成功";
		}
		return msg;
	}

	@SuppressWarnings("unchecked")
	public List queryBusinessInfo(Map map) throws Exception {
		return businessDAO.queryBusinessInfo(map);
	}
}
